<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%
	String path = request.getContextPath();
	String basepath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path;
	
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link rel="stylesheet" type="text/css" href="/gaspider/easyui/themes/default/easyui.css">
	<link rel="stylesheet" type="text/css" href="/gaspider/easyui/themes/icon.css">
	<script type="text/javascript" src="/gaspider/easyui/jquery.min.js"></script>
	<script type="text/javascript" src="/gaspider/easyui/jquery.easyui.min.js"></script>
	<script type="text/javascript" src="/gaspider/easyui/locale/easyui-lang-zh_CN.js"></script>
	<style>
		
		*{
			margin:0;
			padding:0;
		}
		.setting{
			background-color:#F8F8F8;
			width:100%;
			height:15%;
		}
		.content{
			//border:2px solid green;
			height:93%;
		}
		body,html{
			//border:2px solid black;
			height:100%;
			//width:100%;
		}
		.ant{
		font-family: "Microsoft YaHei",华文细黑,微软雅黑,文鼎简报宋;
		font-size:7px;
		}
	 
	</style>
</head>
<body>
<div id="search" style="padding:5px;height:auto" class="ant">  
    <span>开发区:</span>  
    <input id="kaifa" type="text" class="easyui-textbox" style="width:120px;height:24px">
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <span>文章分类:</span>  
    <input id="fenlei" type="text"class="easyui-textbox" style="width:120px;height:24px">
    &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp
    <span>标题:</span>  
    <input id="biaoti" type="text"class="easyui-textbox" style="width:120px;height:24px">
    &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp
    <span>日期:</span>  
    <input id="date" class="easyui-datebox" style="width:120px;height:24px"/>
    &nbsp&nbsp&nbsp&nbsp
    <a href="#" class="easyui-linkbutton" iconCls="icon-search" plain="true" onclick="dooSearch()">搜索</a>  
</div>

	
		<div class="content">
			<table id="dg"></table>
			 
		</div>
		
</body>
</html>
<script>
function dooSearch() {
 
	$("#dg").datagrid({ 
		 url:'/gaspider/DatalistController/serachtype.do'
		
	}); 
	    
	$("#dg").datagrid(
			'load',{
				kaifa: document.getElementById("kaifa").value,	
				fenlei: document.getElementById("fenlei").value,	
				biaoti: document.getElementById("biaoti").value,
				date:$("#date").combobox("getValue")
			});
	
	
}

function doSearch() {
	
		$('#dg').datagrid('load');
		
	
    var kaifa=document.getElementById("kaifa").value;
    var fenlei=document.getElementById("fenlei").value;
    var biaoti=document.getElementById("biaoti").value;
    var date=document.getElementById("date").value;

    var jsonform = {
			"c_kaifa":kaifa,
			"c_fenlei":fenlei,
			"c_biaoti":biaoti,
			"c_date":date,
		
	}
    var url ="<%=basepath %>/DatalistController/serachtype.do";
    $.ajax({
		url: url,
		type: "get",
		data: jsonform,
		idField:"id",
		fit:true,
		success:function(data){
			$('#dg').datagrid('loadData',data);
			
		} 
	}); 
}
$(function(){
	function openWindow(url){
		window.parent.$('#win').window({    
		    width:900,    
		    height:500, 
		    content:'<div style="overflow:hidden;width:100%;height:100%;"><iframe src="'+url+'" frameborder="0" width="100%" height="100%"><iframe></div>',
		    modal:true   
		});
	}
	$("#dg").datagrid({    
	    url:'/gaspider/DatalistController/list.do', 
	    fit:true,
	    pagination:true,
	    idField:"id",
	    rownumbers:true,
	    fitColumns:true,
	    pageSize:20, 
	    pageList: [10, 20, 30] ,
	

	    columns:[[    
				 {
					field : 'area',
					title : '开发区',
					width:200,
					align:'center'
				} ,{
					field : 'leixing',
					title : '分类',
					width:200,
					align:'center'
				} ,{
					field : 'type',
					title : '文献类型',
					width:200,
					align:'center'
				} ,{
					field : 'title',
					title : '标题',
					width:200,
					align:'center'
				} ,{
					field : 'createdata',
					title : '发布日期',
					width:200,
					align:'center'
				}
				]]
	});
	
	
});


</script>